
//
//  SinaRefreshControl.swift
//  SinaWeiBo
//
//  Created by 王忠楠 on 16/9/25.
//  Copyright © 2016年 wangzn. All rights reserved.
//

import UIKit

import UIKit
//  下拉刷新控件的高度
private let SinaRefreshControlHeight: CGFloat = 35
//  下拉刷新控件状态
enum SinaRefreshControlState {
    //  下拉刷新
    case normal
    //  松手就刷新
    case pulling
    //  正在刷新
    case refreshing
}


class SinaRefreshControl: UIControl {
    
    //  当前的控件的刷新状态
    var sinaState: SinaRefreshControlState = .normal
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.frame.size = CGSize(width: ScreenWidth, height: SinaRefreshControlHeight)
        self.frame.origin.y = -SinaRefreshControlHeight
        
        
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    private func setupUI() {
        
        backgroundColor = UIColor.red
    }
    
    
    
}
